home *** CD-ROM | disk | FTP | other *** search
/ Mac Format 1994 October / Macformat17.cdr / Shareware City / Applications / Alpha.5.81 folder / xtcls / XTCL.h < prev   
Text File  |  1994-07-28  |  1KB  |  52 lines

  1.  
  2. #ifndef __DIALOGS__
  3. #include <Dialogs.h>
  4. #endif
  5.  
  6.  
  7. #define TCL_OK        0
  8. #define TCL_ERROR    1
  9.  
  10. #define XTCL_FAILURE            0
  11. #define XTCL_SUCCESS            1
  12. #define XTCL_REQ_UNKNOWN        -1
  13.  
  14. #define ucNoErr                0
  15. #define ucCancelErr            -1
  16. #define ucNoAddrErr            1001
  17.  
  18. #define XTCL_CB_VERSION        0x00010001
  19.  
  20. /* Tcl interpreter structure */
  21. typedef struct Tcl_Interp{
  22.     char *result;        /* Points to result string returned by last
  23.                  * command, TCL_OK or TCL_ERROR. */
  24.     void (*freeProc) (char *blockPtr);
  25.                 /* Zero means result is statically allocated.
  26.                  * If non-zero, gives address of procedure
  27.                  * to invoke to free the result.  Must be
  28.                  * freed by Tcl_Eval before executing next
  29.                  * command. */
  30.     int errorLine;        /* When TCL_ERROR is returned, this gives
  31.                  * the line number within the command where
  32.                  * the error occurred (1 means first line). */
  33. } Tcl_Interp;
  34.  
  35.  
  36. /*
  37. ** This is the interface for text selection resource commands.
  38. */
  39. typedef struct {
  40.     long        version;            /* Version of the Cmd interface. */
  41.     long        result;                /* CMD's operation result code. */
  42.     Handle        resultH;            /* CMD's result handle. */
  43.     short        cmdRefNum;            /* Cmd file reference number. */
  44.     Handle        cmdHandle;            /* CMD's command code handle. */
  45.     Tcl_Interp    *interp;            /* Interpreter calling this XTCL. */
  46.     int            (*eval)();            /* Callback procedure (C) for tcl script evaluation */
  47.     ModalFilterProcPtr    modalproc;    /* Routine for ModalDialog() to keep background. */
  48.     long        reserved;
  49.     } XTCLParmBlk, *XTCLPBPtr;
  50.  
  51.  
  52.